#ifndef VARIABLE_WRAPPER_H
#define VARIABLE_WRAPPER_H
#include "rose.h"
#include <string>
#include "Argument.h"
using namespace std;

class FunctionContext;
class Reference;

class VariableWrapper {
    public:
        VariableWrapper(SgInitializedName *set_name, SgDeclarationStatement *set_decl, FunctionContext *set_enclosing_function); 
        SgInitializedName *get_name() { return name; }
        SgNode *get_decl() { return decl; }
        SgType *get_type() { return name->get_type(); }
        string str();
        string func_str();
        string full_str();
        void addAlias(Reference *);
        int num_aliases() { return n_aliases; }
        Reference *ithAlias(int index) { return aliases[index]; }
        Reference **getAliases() { return aliases; }
        void reset_aliases(Reference **new_aliases, int num_new_aliases) { aliases = new_aliases; n_aliases = num_new_aliases; }
        int getOrder() { return type->getOrder(); }
    private:
        Reference **aliases;
        int n_aliases;
        SgInitializedName *name;
        SgDeclarationStatement *decl;
        FunctionContext *enclosing_function;
        Argument *type;
};

#endif
